#!/bin/sh

echo "Building VAIS..."

libs="./main/main.o ./lmath/lmath.o ./lstring/lstring.o ./lds_ts/lds_ts.o ./init/init.o ./braindo/braindo.o ./braindo/memorize.o ./lserver/lserver.o"
cflag="-I./include/ -I. -I.. -I../../ -I../../include/  -I../../../include/ -Wall -c -o"

gcc $cflag ./main/main.o ./main/main.c
gcc $cflag ./lmath/lmath.o ./lmath/lmath.c
gcc $cflag ./lstring/lstring.o ./lstring/lstring.c
gcc $cflag ./lds_ts/lds_ts.o ./lds_ts/lds_ts.c
gcc $cflag ./init/init.o ./init/init.c
gcc $cflag ./braindo/braindo.o ./braindo/braindo.c
gcc $cflag ./braindo/memorize.o ./braindo/memorize.c
gcc $cflag ./lserver/lserver.o ./lserver/lserver.c

gcc -Wall -lpthread -I../../include/ -o ./directives/initial/initial.Directive ./directives/initial/init.c

gcc -Wall -lpthread -o ./AI ${libs}

date '+PP%y%m%d%H%MDBUILDTIME' >> build.TimeStamp
rm ./build.TimeStamp
date '+PP%y%m%d%H%MDBUILDTIME' >> build.TimeStamp

date '+PP%y%m%d%H%MD000000NUL' >> VAIS.memory/VAIS.laAmoBrianna.TimeStamp
rm ./VAIS.memory/VAIS.laAmoBrianna.TimeStamp
date '+PP%y%m%d%H%MD000000NUL' >> VAIS.memory/VAIS.laAmoBrianna.TimeStamp